package com.jingtao.product.mapper;

import com.jingtao.product.domain.DTO.ProductExample;
import com.jingtao.product.domain.Product;
import com.jingtao.product.domain.vo.QueryProductVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName:
 * @Description:
 * @Author: zengfanzhen
 * @Date: 2024/3/26 19:08:57
 */
@Mapper
public interface ProductMapper {

    void addProduct(Product product);

    List<Product> queryProduct(QueryProductVo queryProductVo);

    /**
     * 添加商品信息
     * @param product
     */
    void insertSelective(Product product);

    /**
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(Product record);

    int updateByExampleSelective(@Param("record") Product record, @Param("example") ProductExample example);
}
